]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screencast: Don't force buffer copies on recent gstreamer versions
authorSebastian Keller <skeller@gnome.org>
Wed, 5 Oct 2022 22:20:16 +0000 (00:20 +0200)
committerMarge Bot <marge-bot@gnome.org>
Thu, 20 Oct 2022 13:56:47 +0000 (13:56 +0000)
Gstreamer 1.20.4 includes a fix in the videoconvert element that makes
it no longer necessary to always copy buffers in pipewiresrc to have
smooth recordings. This change now skips those otherwise unnecessary
copies when using a new enough videoconvert.

Related: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2928
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2503>

js/dbusServices/screencast/screencastService.js

index 5ff5aff529d404766e4a86717dc48ce5416fb8c1..bb53874289abe43eb62cfd877b84bbe417046cc7 100644 (file)
@@ -231,7 +231,8 @@ var Recorder = class {
     _ensurePipeline(nodeId) {
         const framerate = this._framerate;
         const needsCopy =
-            Gst.Registry.get().check_feature_version('pipewiresrc', 0, 3, 57);
+            Gst.Registry.get().check_feature_version('pipewiresrc', 0, 3, 57) &&
+            !Gst.Registry.get().check_feature_version('videoconvert', 1, 20, 4);
 
         let fullPipeline = `
             pipewiresrc path=${nodeId}